package com.eyas.business.config.jdbcTemplate;

import com.eyas.core.annotation.JdbcTemplateModelFilter;
import com.eyas.core.jdbc.utils.CommonJdbcUtils;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.context.annotation.*;
import org.springframework.jdbc.core.JdbcTemplate;


/**
 * @Auther: 王龙龙
 * @Date: 2018/11/30 09:46
 * @Description:
 */
@Configuration
@ComponentScan(basePackages = "com.eyas.business.model.jdbcEntity",useDefaultFilters = false,
includeFilters = {@ComponentScan.Filter(type = FilterType.CUSTOM,classes = JdbcTemplateModelFilter.class)})
public class JdbcTempleteConfig {

    @Bean(autowire = Autowire.NO)
    @Scope("singleton")
    public CommonJdbcUtils commonJdbcTemplete(JdbcTemplate jdbcTemplate) {
        return new CommonJdbcUtils(jdbcTemplate);
    }

}
